// Created by WXX on 2022/1/5 18:30
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

/**
 * 执行用时：0 ms, 在所有 C++ 提交中击败了100.00%的用户
 * 内存消耗：6 MB, 在所有 C++ 提交中击败了24.61%的用户
 */
class Solution {
public:
    string modifyString(string s) {
        string res;
        for (int i = 0; i < s.size(); i++) {
            if (s[i] != '?') res += s[i];
            else {
                for (char c = 'a'; c != 'z'; c++)
                    if ((i == 0 || res[i - 1] != c) && (i + 1 == s.size() || s[i + 1] != c)) {
                        res += c;
                        break;
                    }
            }
        }
        return res;
    }
};

int main() {

    cout << Solution().modifyString("?zs") << endl;  // azs

    return 0;
}
